package com.xindong.paking.controller;

import com.xindong.paking.entity.TbUser;
import com.xindong.paking.entity.vo.TbUserVo;
import com.xindong.paking.service.PersonalModularService;
import com.xindong.paking.utils.Result;
import com.xindong.paking.utils.UserInfoUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @Author jielun
 * @Date 2023/1/6 11:22
 * @Version 1.0
 */
@RestController
@RequestMapping("/parking/personal")
@Api(tags = "个人中心模块")
public class PersonalModularController {

    @Autowired
    private PersonalModularService service;

    @GetMapping("search")
    @ApiOperation("获取个人信息")
    public Result getUser(HttpServletRequest request) {
        TbUserVo user = service.getUser();
        return Result.success("获取成功", user);
    }

/*    @PostMapping("update")
    @ApiOperation("更新个人信息")
    public Result updatePersonal(HttpServletRequest request) {
        return Result.success("","");
    }*/
}
